import { Post } from "@/library/utils/request";

/**
 * 谷歌验证码 API请求路径
 */
export const GoogleAuthApiUrl = {
  GetGoogleAuth: "Rbac/NewGoogleAuthSecret",
  UpdateGoogleAuth: "Rbac/UpdateUserGoogleAuthSecret",
  TestGoogleAuth: "Rbac/TestGoogleAuth",
  EnableGoogleAuthSecret: "Rbac/EnableGoogleAuth",
  ResetGoogleAuthSecret: "Rbac/ResetGoogleAuthSecret"
}

export const GoogleAuthApi = {
  /** 获取Google验证码 */
  GetGoogleAuth: (param: object) => {
    return Post(GoogleAuthApiUrl.GetGoogleAuth, param);
  },
  /** 更新Google验证码 */
  UpdateGoogleAuth: (param: object) => {
    return Post(GoogleAuthApiUrl.UpdateGoogleAuth, param);
  },
  /** 测试Google验证码 */
  TestGoogleAuth: (param: object) => {
    return Post(GoogleAuthApiUrl.TestGoogleAuth, param);
  },
  /** 能否使用谷歌验证码 */
  EnableGoogleAuthSecret: (param: object) => {
    return Post(GoogleAuthApiUrl.EnableGoogleAuthSecret, param);
  },
  /** 激活谷歌验证码 */
  ResetGoogleAuthSecret: (param: object) => {
    return Post(GoogleAuthApiUrl.ResetGoogleAuthSecret, param);
  }
}

